package com.openbravo.pos.util;

import java.awt.Component;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import javax.swing.Icon;
import javax.swing.JLabel;

public class LabelIcon extends JLabel
  implements Icon
{
  private int iconwidth;
  private int iconheight;

  public LabelIcon(int paramInt1, int paramInt2)
  {
    this.iconwidth = paramInt1;
    this.iconheight = paramInt2;
  }

  public BufferedImage getImage(int paramInt1, int paramInt2)
  {
    BufferedImage localBufferedImage = new BufferedImage(paramInt1, paramInt2, 2);
    Graphics2D localGraphics2D = localBufferedImage.createGraphics();
    setBounds(0, 0, paramInt1, paramInt2);
    paint(localGraphics2D);
    localGraphics2D.dispose();
    return localBufferedImage;
  }

  public void paintIcon(Component paramComponent, Graphics paramGraphics, int paramInt1, int paramInt2)
  {
    setBounds(0, 0, this.iconwidth, this.iconheight);
    paramGraphics.translate(paramInt1, paramInt2);
    paint(paramGraphics);
    paramGraphics.translate(-paramInt1, -paramInt2);
  }

  public int getIconWidth()
  {
    return this.iconwidth;
  }

  public int getIconHeight()
  {
    return this.iconheight;
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.pos.util.LabelIcon
 * JD-Core Version:    0.6.0
 */